﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucCustomer.ascx.cs" Inherits="Admin_UserControl_ucCustomer" %>
<h3 style="color: Red">
    Details Customer</h2>
    <table width="90%">
        <tr>
            <td>
                First Name
            </td>
            <td>
                <asp:TextBox ID="txtFName" runat="server"></asp:TextBox>
            </td>
            <td>
                Last Name
            </td>
            <td>
                <asp:TextBox ID="txtLName" runat="server"></asp:TextBox>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                Address
            </td>
            <td colspan="4">
                <asp:TextBox ID="txtAddress" runat="server" Width="56.5%"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Sate
            </td>
            <td>
                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            </td>
            <td>
                Post Code
            </td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            </td>
            <td>
                Suburb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                Mobile Phone
            </td>
            <td>
                <asp:TextBox ID="txtMobilePhone" runat="server"></asp:TextBox>
            </td>
            <td>
                Home Phone
            </td>
            <td>
                <asp:TextBox ID="txtHomPhone" runat="server"></asp:TextBox>
            </td>
            <td>
                Work Phone
                <asp:TextBox ID="txtWorkPhone" runat="server"></asp:TextBox>
            </td>
        </tr>
    </table>
    <h3 style="color: Red">
        List Email</h2>
        <asp:DataList ID="DataList1" runat="server" OnItemCommand="DataList1_ItemCommand"
            OnItemDataBound="DataList1_ItemDataBound" RepeatDirection="Horizontal">
            <SeparatorTemplate>
                | &nbsp;
            </SeparatorTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="lnkbtnPaging" runat="server" CommandArgument='<%# Bind("PageIndex") %>'
                    Text='<%# Bind("PageText") %>'></asp:LinkButton>
            </ItemTemplate>
        </asp:DataList>
        <br />

        <script type="text/javascript">
            function s() {
                var t = document.getElementById("<%=grdListEmail.ClientID%>");
                var t2 = t.cloneNode(true)
                for (i = t2.rows.length - 1; i > 0; i--)
                    t2.deleteRow(i)
                t.deleteRow(0)
                a.appendChild(t2)
            }
            window.onload = s
        </script>

        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <div id="a">
                    </div>
                    <div style="overflow-y: scroll; height: 250px">
                        <asp:GridView ID="grdListEmail" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                            EmptyDataText="Not Found Email" AllowSorting="True" CssClass="yui" Width="100%"
                            OnPageIndexChanging="grdListEmail_PageIndexChanging" OnSorting="grdListEmail_Sorting"
                            OnRowDataBound="grdListEmail_RowDataBound">
                            <Columns>
                                <asp:BoundField DataField="IDEmail" HeaderText="ID" SortExpression="IDEmail">
                                    <HeaderStyle HorizontalAlign="Center" ForeColor="White" />
                                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                                </asp:BoundField>
                                <asp:HyperLinkField DataTextField="EmailAddress" HeaderText="Email Address" SortExpression="EmailAddress">
                                    <ItemStyle HorizontalAlign="Center" Width="15%" />
                                    <HeaderStyle HorizontalAlign="Center" Width="15%" ForeColor="White" />
                                </asp:HyperLinkField>
                                <%--<asp:BoundField DataField="status" HeaderText="Status" SortExpression="status" />--%>
                                <asp:BoundField DataField="DateBook" HeaderText="Date Book" SortExpression="Price"
                                    DataFormatString="{0:dd/MM/yyyy}" >
                                    <HeaderStyle Width="20%" HorizontalAlign="Center" ForeColor="White" />
                                    <ItemStyle Width="20%" HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Notes">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtNotes" TextMode="MultiLine" Width="84%" Height="20px" runat="server"></asp:TextBox>
                                        <asp:CheckBox ID="ckEnable" runat="server" OnCheckedChanged="ckEnable_CheckedChanged"
                                            AutoPostBack="true" />
                                        <asp:ImageButton ID="btnSave" runat="server" ToolTip="Save" CommandName="Delete"
                                            OnClick="btnSave_Click" CommandArgument='<%# Eval("IDEmail") %>' ImageUrl="~/Admin/img/ic-save.png" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="65%" />
                                    <HeaderStyle Width="65%" HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle CssClass="clsGrdHeader" />
                            <RowStyle CssClass="clsGrdRow" />
                            <AlternatingRowStyle CssClass="clsGrdAlternateRow" />
                            <PagerStyle CssClass="clsPage" />
                        </asp:GridView>
                    </div>
                </td>
            </tr>
        </table>
